package org.example.design.designmode.combination.coursedemo;

public class Test {

    public static void main(String[] args) {
        System.out.println("______________透明组合______________");
        CourseComent java = new Course("java入门课程",1000);
        CourseComent ai = new Course("Ai人工智能",1900);


        CourseComent packages = new CoursePackage("java 架构师课程",8900.00,2);

        CourseComent sheji = new Course("java设计模式",6000);
        CourseComent soure = new Course("源码分析",2900);
        CourseComent ruan = new Course("软技能",1000);


        packages.addChild(sheji);
        packages.addChild(soure);
        packages.addChild(ruan);



        CourseComent gupao = new CoursePackage("沽泡课程目录",7900.00,1);
        gupao.addChild(java);
        gupao.addChild(ai);
        gupao.addChild(packages);
        gupao.print();
    }
}
